package com.lanchewuyou.user.driver.yancheui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageButton;

import com.bm.library.PhotoView;
import com.bumptech.glide.Glide;
import com.lanchewuyou.user.driver.R;

public class YanchePhotoActivity extends AppCompatActivity {

    private ImageButton yanchePhotoBack;
    private PhotoView photoView;
    private String imgUrl="";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_yanche_photo);
        Intent intent=getIntent();
        imgUrl=intent.getStringExtra("yancheimgurl");
        yanchePhotoBack=(ImageButton)findViewById(R.id.yanche_photo_back);
        yanchePhotoBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        photoView=(PhotoView)findViewById(R.id.yanche_photo_img);
        Glide.with(this).load(imgUrl)
                .centerCrop()
                .error(R.mipmap.yanche_place_img).crossFade()
                .into(photoView);
    }
}
